﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kovan.Model.Enums;
namespace Kovan.Model.Common
{
    [Serializable]
    public class ResultModel<T>
    {
        public ResultModel()
        {
            TotalMilliseconds = -1; // 用负数来表示没赋值(0有可能是时间极短)
        }
        /// <summary>
        /// 状态
        /// </summary>
        public bool Status { get; set; }

        /// <summary>
        /// 操作返回状态
        /// </summary>
        public StatusEnum StatusCode { get; set; }

        /// <summary>
        /// 数据容器
        /// </summary>
        public T Data { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 总页数
        /// </summary>
        public int TotalPages { get; set; }

        /// <summary>
        /// 总行数
        /// </summary>
        public int TotalRows { get; set; }

        /// <summary>
        /// 请求底层接口数据的时间,毫秒。
        /// </summary>
        public double TotalMilliseconds { get; set; }

    }
}
